# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Kyle Keen <keenerd@gmail.com>

pkgname=jupyter-widgetsnbextension
pkgver=4.0.7
pkgrel=2
epoch=1
pkgdesc='Interactive HTML widgets for Jupyter notebooks'
arch=(any)
url='https://pypi.python.org/pypi/widgetsnbextension'
license=(BSD)
depends=(jupyter-notebook python-ipywidgets)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=(https://pypi.io/packages/source/w/widgetsnbextension/widgetsnbextension-$pkgver.tar.gz)
sha256sums=('ea67c17a7cd4ae358f8f46c3b304c40698bc0423732e3f273321ee141232c8be')

build() {
  cd widgetsnbextension-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd widgetsnbextension-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  mv "$pkgdir/usr/etc" "$pkgdir/etc"
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
